/******************************************************************************
 * program:     rasimg library                                                *
 * function:    Module for SVG support                                        *
 * modul:       ras_svg.cc                                                    *
 * licency:     GPL or LGPL                                                   *
 ******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "typedfs.h"
#include "raster.h"
#include "struct.h"

#include "imgsupp.h"


#if defined(SupportSVG) && SupportSVG>0
// https://www.w3.org/TR/SVG2/shapes.html

//--------------------------SVG---------------------------
#ifdef SupportSVG



#if SupportSVG>=4 || SupportSVG==2


Image LoadPictureSVG(const char *Name)
{
BYTE *OutCode=NULL;
WORD *Prefix=NULL,*Suffix=NULL;
WORD Nacteno;
FILE *f;
Image Img,*CurrImg;
WORD InCode,OldCode,CurCode,Code,ClearCode,OutCount,FirstFree,FreeCode,EOFCode,MaxCode;
BYTE FinChar,BitMask,CodeSize,InitCodeSize;
WORD X,Y;
int Interlace;
void *CompBuffer;
Raster2DAbstract *Raster=NULL;
APalette *Palette=NULL,*LocalPalette=NULL;
const int GIFBufSize=256;
int I;

  CompBuffer=NULL;
  CurrImg=&Img;

  if((f=fopen(Name,"rb"))==NULL) return(NULL);

FINISH:
 //fclose(F);
 if(f) fclose(f);

 return(Img);
} //LoadGIF

#endif


#if SupportSVG>=3


/*
int SavePictureSVG(const char *Name, const Image &Img)
{
FILE *f;
const Image *CurrentImage;


  if((f=fopen(Name,"wb"))==NULL) return(-1);


  fclose(f);
return 0;
}
*/

#endif


#endif
//-------------------End of SVG routines------------------
